package com.erp.remote.sale;

import com.erp.util.AjaxResult;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @Description:销货退货远程接口
 * @Author: lyj
 * @Date: 2025/6/30 15:51
 */
@RequestMapping("/saleReject")
public interface SaleRejectRemote {
    /**
     * @description: 根据公司id，获取已审核的销货退货单
     * @author: lyj
     * @date: 2025/7/16 
     * @param: []
     * @return: com.erp.util.AjaxResult
    **/
    @GetMapping("/allExamined")
    public AjaxResult allExamined(@RequestParam("companyId") Integer companyId);
    @GetMapping("/getById")
    AjaxResult getById(@RequestParam("id") Integer id,@RequestParam("companyId") Integer companyId);
    
    /**
     * @description: 修改销货退货单详情的为入库数量，goodsNum传负数 
     * @author: lyj
     * @date: 2025/7/17 
     * @param: [companyId, id, goodsNum]
     * @return: com.erp.util.AjaxResult
    **/
    @GetMapping("/detail/editById")
    AjaxResult editDetailById(@RequestParam("companyId") Integer companyId,@RequestParam("id") Integer id,@RequestParam("goodsNum") Integer goodsNum);
    /**
     * @description: 根据任意条件查询的销货退货单据,该单据是已审核且未全部退款的
     * @author: lyj
     * @date: 2025/7/11
     * @param: [params] 可传入customerId companyId,searchMix(根据日期，单据编号，备注查询)
     * @return: com.erp.util.AjaxResult
     **/
    @GetMapping("/getAsSource")
    AjaxResult getAsSource(@RequestParam Map<String,Object> params);
    @PostMapping("/examinedResult")
    public AjaxResult examinedResult(@RequestBody Map<String,Object> params);

    /**
     * @description: 查询所有销货退货单的数量
     * @author: lyj
     * @date: 2025/7/23
     * @param: [companyId]
     * @return: com.erp.util.AjaxResult
     **/
    @GetMapping("/getSaleRejectCount")
    AjaxResult getSaleRejectCount(@RequestParam("companyId") Integer companyId);
}
